class SearchArticleModel {
  String courseTypeCode;
  String courseCode;
  String courseDate;
  String courseName;
  String typePhotoLink;
  String typeShortDesc;
  String promotion;
  List<DataList> dataList;

  SearchArticleModel(
      {this.courseTypeCode,
        this.courseCode,
        this.courseDate,
        this.courseName,
        this.typePhotoLink,
        this.typeShortDesc,
        this.promotion,
        this.dataList});

  SearchArticleModel.fromJson(Map<String, dynamic> json) {
    courseTypeCode = json['course_type_code'];
    courseCode = json['course_code'];
    courseDate = json['course_date'];
    courseName = json['course_name'];
    typePhotoLink = json['type_photo_link'];
    typeShortDesc = json['type_short_desc'];
    promotion = json['promotion'];
    if (json['data_list'] != null) {
      dataList = new List<DataList>();
      json['data_list'].forEach((v) {
        dataList.add(new DataList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['course_type_code'] = this.courseTypeCode;
    data['course_code'] = this.courseCode;
    data['course_date'] = this.courseDate;
    data['course_name'] = this.courseName;
    data['type_photo_link'] = this.typePhotoLink;
    data['type_short_desc'] = this.typeShortDesc;
    data['promotion'] = this.promotion;
    if (this.dataList != null) {
      data['data_list'] = this.dataList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class DataList {
  String courseDate;
  String courseCode;
  String fee;

  DataList({this.courseDate, this.courseCode, this.fee});

  DataList.fromJson(Map<String, dynamic> json) {
    courseDate = json['course_date'];
    courseCode = json['course_code'];
    fee = json['fee'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['course_date'] = this.courseDate;
    data['course_code'] = this.courseCode;
    data['fee'] = this.fee;
    return data;
  }
}
